-- CALC_TIME_BOMB_DAMAGE

-- 计算定时炸弹的伤害
-- @param trapId    陷阱id
-- @param key       类型
return function(trapId, key)
    -- 伤害与迷宫、楼层挂钩
    local dungeonId = DungeonM.getDungeonId();
    local layerFix  = DungeonAreaM.query(dungeonId, "layer_fix");
    local layer     = DungeonM.currentLayer();

    -- 炸弹人专属技等级
    local prop   = PropM.combine(ME.user, "slime_strengthen", "trap");
    local level  = PropM.apply(prop, 0);
    local force  = (level * 3 + 5 + layer)
    local damage = FormulaM.invoke("CALC_BIG_DIVISION", math.pow(force, 2), layerFix + 60, 1500)
    -- 超级炸弹5倍伤害
    if CommonTrapM.query(trapId, "radius") > 2 then
        damage = damage * 5;
    end

    -- 额外增加的伤害
    local cannon = FormulaM.invoke("CALC_CANNON_ADDITION_DAMAGE");
    damage = damage + cannon;

    return damage;
end
